package edu.study.user.api;

import java.util.List;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import edu.study.api.common.dto.BaseRespDto;
import edu.study.api.common.dto.PageRespDto;
import edu.study.api.common.dto.RespDto;
import edu.study.user.api.dto.DepartmentAndSubDto;
import edu.study.user.api.dto.DepartmentDto;
import edu.study.user.api.req.department.AddDepartmentReq;
import edu.study.user.api.req.department.DeleteDepartmentReq;
import edu.study.user.api.req.department.ModifyDepartmentReq;
import edu.study.user.api.req.department.ModifyDepartmentStatusReq;
import edu.study.user.api.req.department.QueryDepartmentPageListReq;
import edu.study.user.api.req.department.QueryDepartmentReq;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * 1.要么没有入参，要么封装成req对象
 * 2.返回类型：BaseRespDto RespDto<T> PageRespDto<T> 三种
 */
@RequestMapping("/api/user/departmentApi")
@Api(value = "/api/user/departmentApi", tags = { "部门相关接口-1.0" })
public interface DepartmentApi {
	
    @ApiOperation(value = "新增部门")
    @RequestMapping(value = "addDepartment", method = {RequestMethod.POST})
    BaseRespDto addDepartment(@RequestBody AddDepartmentReq req);
    
    @ApiOperation(value = "删除部门")
    @RequestMapping(value = "deleteDepartment", method = {RequestMethod.POST})
    BaseRespDto deleteDepartment(@RequestBody DeleteDepartmentReq req);
    
    @ApiOperation(value = "修改部门")
    @RequestMapping(value = "modifyDepartment", method = {RequestMethod.POST})
    BaseRespDto modifyDepartment(@RequestBody ModifyDepartmentReq req);
    
    @ApiOperation(value = "失效/生效")
    @RequestMapping(value = "modifyDepartmentStatus", method = {RequestMethod.POST})
    BaseRespDto modifyDepartmentStatus(@RequestBody ModifyDepartmentStatusReq req);
    
    @ApiOperation(value = "查询部门")
    @RequestMapping(value = "queryDepartment", method = {RequestMethod.POST})
    RespDto<DepartmentDto> queryDepartment(@RequestBody QueryDepartmentReq req);
    
    @ApiOperation(value = "分页查询部门")
    @RequestMapping(value = "queryDepartmentPageList", method = {RequestMethod.POST})
    PageRespDto<DepartmentAndSubDto> queryDepartmentPageList(@RequestBody QueryDepartmentPageListReq req);
    
    @ApiOperation(value = "查询部门及其子部门列表")
    @RequestMapping(value = "queryDepartmentAndSubList", method = {RequestMethod.POST})
    RespDto<List<DepartmentDto>> queryDepartmentAndSubList(@RequestBody QueryDepartmentReq req);
    
    @ApiOperation(value = "查询部门及其子部门")
    @RequestMapping(value = "queryDepartmentAndSub", method = {RequestMethod.POST})
    RespDto<DepartmentAndSubDto> queryDepartmentAndSub(@RequestBody QueryDepartmentReq req);
}
